package org.example.Server.strategy.question;

import org.example.Server.mapper.question.QuestionMapper;
import org.example.Server.model.question.QUpdate;
import org.example.Server.model.question.Question;
import org.example.Server.service.question.QuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 问答题的更新策略实现类
 */

@Component
public class QnaQsUpdateStrategy implements QsUpdateStrategy {
    private final QuestionMapper questionMapper;

    public QnaQsUpdateStrategy(QuestionMapper questionMapper) {
        this.questionMapper = questionMapper;
    }

    @Override
    public void qsUpdate(QUpdate qs) {
        questionMapper.updateQna(qs);
    }
}
